package com.rc.saas.tenant.common.enums;

/**
 * @author frog
 * @date 2021/7/29
 */
public enum InterceptEnum {
    ENTERPRISE_SUBMEMBER_SHARE_UPDATE_CLEAR_BALANCE("com.rc.saas.tenant.mapper.enterprise.EnterpriseSubmemberShareMapper.updateClearBalance", "清空共享余额"),
    TENANT_TICKET_SCHEDULE_UPDATE_BYPRIMARYKEY_SELECTIVE("com.rc.saas.tenant.service.ticket.TenantTicketScheduleMapper.updateByPrimaryKeySelective", "更新优惠券发送计划"),
    MEMBER_TICKET_INSERT_SELECTIVE("com.rc.saas.tenant.service.ticket.MemberTicketMapper.insertSelective", "增加会员优惠券");


    private final String code;
    private final String msg;

    InterceptEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    public static Boolean contains(String code) {
        for (InterceptEnum interceptEnum : InterceptEnum.values()) {
            if (interceptEnum.getCode().equals(code)) {
                return true;
            }
        }
        return false;
    }

}
